<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html>
<head>
<title>EmailAccount Admin | mailadmin.uptel.net</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
	href="${pageContext.request.contextPath}/resources/css/bootstrap.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath}/resources/css/bootstrap-responsive.css"
	rel="stylesheet" />
<link href="${pageContext.request.contextPath}/resources/css/docs.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath}/resources/js/google-code-prettify/prettify.css"
	rel="stylesheet" />

</head>

<body data-spy="scroll" data-target=".subnav" data-offset="50">


	<!-- Navbar
    ================================================== -->
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a> <a class="brand" href="./index.html">Bootstrap</a>
				<div class="nav-collapse">
					<ul class="nav">
						<li class="active">
							<a href="${pageContext.request.contextPath}/index.html">
								<spring:message	code="label.alllist" />
							</a>
						</li>
						<li class="">
							<a href="${pageContext.request.contextPath}/add.html">
								<spring:message	code="label.newaccount_legend" />
							</a>
						</li>
						<li class=""><a href="./components.html">Components</a></li>
						<li class=""><a href="./javascript.html">Javascript	plugins</a></li>
						<li class=""><a href="./less.html">Using LESS</a></li>
						<li class="divider-vertical"></li>
						<li class=""><a href="./download.html">Customize</a></li>
						<li class=""><a href="./examples.html">Examples</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>

	<div class="container">

	<h3><spring:message	code="label.alllist" /></h3>
		<c:if test="${!empty emailAccountList}">
			<table class="table table-bordered">
				<tr>
					<th><spring:message code="label.username" /></th>
					<th><spring:message code="label.fullname" /></th>
					<th>Email</th>
					<th><spring:message code="label.quota" /></th>
					<th><spring:message code="label.last.access" /></th>
					<th><spring:message code="label.active" /></th>
					<th><spring:message code="label.imapAllowed" /></th>
				</tr>
				<c:forEach items="${emailAccountList}" var="emailAccount">
					<tr>
						<td><a href="edit/${emailAccount.id}">${emailAccount.username}</a></td>
						<td>${emailAccount.fullname}</td>
						<td>${emailAccount.username}@${emailAccount.domain}</td>
						<td>${emailAccount.quota}</td>
						<td>${emailAccount.modifiedDate}</td>
						
						<c:if test="${emailAccount.active}">
							<td><i class="icon-plus"/></td>
						</c:if>
						<c:if test="${!emailAccount.active}">
							<td><i class="icon-minus"/></td>
						</c:if>
						
						<c:if test="${emailAccount.imapAllowed}">
							<td><i class="icon-plus"/></td>
						</c:if>
						<c:if test="${!emailAccount.imapAllowed}">
							<td><i class="icon-minus"/></td>
						</c:if>
						
						<!--  <td><a href="delete/${emailAccount.id}"><i class="icon-remove"></i></a></td> -->
					</tr>
				</c:forEach>
			</table>
			<div>
			<table>
				<c:if test="${pageFirst lt 1}">
					<th><a href="#" class="btn btn-mini disabled"><i class="icon-fast-backward"/></a></th>
				</c:if>
				
				<c:if test="${pageFirst gt 0}">
					<th><a href="${pageContext.request.contextPath}/index/${pagePrev}" class="btn btn-mini"><i class="icon-fast-backward"/></a></th>
				</c:if>
				
				
				<c:if test="${pagePrev lt 1}">
					<th><a href="#" class="btn btn-mini disabled"><i class="icon-backward"/></a></th>
				</c:if>
				
				<c:if test="${pagePrev gt 0}">
					<th><a href="${pageContext.request.contextPath}/index/${pagePrev}" class="btn btn-mini"><i class="icon-backward"/></a></th>
				</c:if>
				
				
				<c:if test="${pageNext lt 1}">
					<th><a href="#" class="btn btn-mini disabled"><i class="icon-forward"/></a></th>
				</c:if>
				
				<c:if test="${pageNext gt 0}">
					<th><a href="${pageContext.request.contextPath}/index/${pageNext}" class="btn btn-mini"><i class="icon-forward"/></a></th>
				</c:if>
				
				<c:if test="${pageLast lt 1}">
					<th><a href="#" class="btn btn-mini disabled"><i class="icon-fast-forward"/></a></th>
				</c:if>
				
				<c:if test="${pageLast gt 0}">
					<th><a href="${pageContext.request.contextPath}/index/${pageNext}" class="btn btn-mini"><i class="icon-fast-forward"/></a></th>
				</c:if>
				
			</table>
			</div>
		</c:if>
	</div>
</body>

</html>